<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
<head th:replace="dashboard/header :: header"></head>

<body class="gray-bg">
	
	<link rel="stylesheet" th:href="@{/asserts/js/plugins/ztree/css/metroStyle/metroStyle.css}" type="text/css">
	
	<div class="container-div">
		<div class="row">
			 	  <!-- 
			 <div class="card col-lg-3">
			 	  <div class="card-body">
                   		<ul id="treeDemo" class="ztree"></ul>	
                  </div>
                  <div class="box box-main  search-collapse">
					<div class="box-header">
						<div class="box-title">
							<i class="fa icon-grid"></i> 组织机构
						</div>
						<div class="box-tools pull-right">
							<button type="button" class="btn btn-box-tool" id="btnAdd" title="添加部门" onclick="openDept()"><i class="fa fa-plus"></i></button>
							<button type="button" class="btn btn-box-tool" id="btnRefresh" title="刷新部门"><i class="fa fa-refresh"></i></button>
						</div>
					</div>
					<div class="ui-layout-content">
						<ul id="treeDemo" class="ztree"></ul>	
					</div>
				</div>
             </div>
			 	   -->
                  
					
			 <div class="col-lg-12" style="float:left;">
				<div class="col-sm-12 search-collapse">
					<form id="operlog-form">
						<div class="select-list">
							<ul>
								<li>
									<label>用户名： </label><input type="text" name="condition[name|like]"/>
								</li>
								<li>
									<label>登陆名： </label><input type="text" name="condition[loginName|like]"/>
								</li>
								
								<!-- 
								<li class="select-selectpicker">
									<label>操作类型： </label><select id="businessTypes" class="selectpicker" data-none-selected-text="请选择" multiple>
										<option value="1">新增</option>
										<option value="2">修改</option>
										<option value="3">删除</option>
										<option value="4">授权</option>
										<option value="5">导出</option>
										<option value="6">导入</option>
										<option value="7">强退</option>
										<option value="8">生成代码</option>
										<option value="9">清空数据</option>
									</select>
								</li>
								<li class="select-time">
									<label>操作时间： </label>
									<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginTime]"/>
									<span>-</span>
									<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endTime]"/>
								</li>
								<li>
									<label>操作状态：</label><select name="status">
										<option value="">所有</option>
										<option value="0">成功</option>
										<option value="1">失败</option>
									</select>
								</li>
								 -->
								 
								<li>
									<a class="btn btn-primary btn-rounded btn-sm" onclick="searchPre()"><i class="fa fa-search"></i>&nbsp;搜索</a>
									<a class="btn btn-warning btn-rounded btn-sm" onclick="resetPre()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
								</li>
							</ul>
						</div>
					</form>
				</div>
				
				<div class="btn-group-sm" id="toolbar" role="group">
				
					<!-- 
					<a class="btn btn-success" onclick="$.operate.add()">
						<i class="fa fa-plus"></i> 新增
					</a>
					<a class="btn btn-danger btn-del disabled" onclick="$.operate.removeAll()">
			            <i class="far fa-trash-alt"></i> 删除
			        </a>
			        <a class="btn btn-danger" onclick="$.operate.clean()">
		                <i class="fa fa-trash"></i> 清空
		            </a>
					 -->
					 
		            <a class="btn btn-warning" onclick="$.table.exportExcel()">
			            <i class="fa fa-download"></i> 导出
			        </a>
		        </div>
		        
				<div class="col-sm-12 select-table table-striped">
					<table id="bootstrap-table" data-mobile-responsive="true"></table>
				</div>
				
			</div>
			
			
		</div>
	</div>
	
	<footer th:replace="dashboard/footer :: footer"></footer>

	<script type="text/javascript" th:inline="javascript">
		
		$(function() {
			var roleId = [[${roleId}]]
		    var options = {
		        url: ctx+"portal/ucenter/account/roleMemberDatatables?roleId=" + roleId ,
		        sortName: "operTime",
		        uniqueId:"id" ,
		        sortOrder: "desc",
		        modalName: "账号",
		        escape: true,
		        showPageGo: true,
		        rememberSelected: true,
		        columns: [{field: 'state',checkbox: true },
					{field: 'applicationIdLabel', title: '所属应用'},
					{field: 'name', title: '用户名'},
			        {field: 'loginName', title: '登陆名'},
			        {field: 'departmentLabel', title: '所属部门'},
			        {field: 'rolePowerLabel', title: '权限类型'},
			        {field: 'hasStatusLabel', title: '状态', align: 'center',  formatter:function(value,row,index){ return $.table.status(value , row);}}
			       ]
		    };
		    $.table.init(options);
		});
		
	</script>
</body>
</html>